#include<iostream>
using namespace std;
int v[10],m,i,ok;

int main(void)
{ int aux,j,ok;
  cout<<"m=";cin>>m;

for(i=0;i<m;i++)
  { cout<<"v["<<i<<"]=";
     cin>>v[i];
    }
ok=0;
do{ ok=1;
for (i=0;i<m-1;i++)
     
  
        if (v[i]>v[i+1])
         { aux=v[i];
           v[i]=v[i+1];
           v[i+1]=aux;
           ok=0;
          }
}while(ok==0);
 for(i=0;i<m;i++)
  cout<<" "<<v[i];



}
